﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Expect.Report.Word.Processors;

namespace Expect.Core.Test
{
    using Expect.Report.Word;

    [TestClass]
    public class ReportTokenizer
    {
        private DescriptionFixtureProcessor _processor;

        [TestInitialize]
        public void InitProcessor()
        {
            _processor = new DescriptionFixtureProcessor();
            _processor.Configuration = new ReportConfiguration();
            _processor.Configuration.Runs.Add(new TextRun{Token='*', Bold = true});
            _processor.Configuration.Runs.Add(new TextRun { Token = '_', Underline = true });
            _processor.Configuration.Runs.Add(new TextRun { Token = '#', Underline = true });
        }

        [TestMethod]
        public void TestMethod1()
        {
            var runs = _processor.GetRuns("*un text en gras* suivi d'un texte normal, _un peu de souligné_  # et # *terminé par un text end gras*");
            Assert.AreEqual(5, runs.Count);
        }
    }
}
